
*****************************************************************
*****************************************************************
*****************************************************************
***															  ***
*** Losers’ Conspiracy: Elections and Conspiracism ***
***															  ***
*****************************************************************
*****************************************************************

*****************************************************************
*****************************************************************
*****************************************************************
***DATASETS:
***Study 1 CSPP 2016.dta
***Study 2 CCES 2016.dta
***Study 3 CCES UMN 2018.dta
***Study 4 CCES CPC 2018.dta
***Study 5 CES UDEL 2020.dta
*****************************************************************
*****************************************************************
*****************************************************************


*****************************************************************
*****************************************************************
*****************************************************************
***															  
**Code to make all variables for analyses. 
**All analysis variables saved in datasets.
***															  
*****************************************************************
*****************************************************************
****************************************************************


*****************************
*** STUDY 1 CSPP 2016***
*****************************


*use “STUDY 1 CSPP 2016.dta”


*******************
***tookpost***
*******************

*gen completew1=.
*replace completew1=1 if consent==1

*fre completew1 consent

*gen tookpost=.
*replace tookpost=0 if completew1==1 & completew4!=1
*replace tookpost=1 if completew1==1 & completew4==1

*fre completew1 completew4 tookpost



*******************
***cdscalew1***
*******************

*fre w1consp1 w1consp2 w1consp3 w1consp4


*gen cd1w1 = (w1consp1-1)/4
*label var cd1w1 "01 Recode CD w1consp1: Much of our lives are being controlled by plots hatched in secret places"
*fre w1consp1 cd1w1

*gen cd2w1 = (w1consp2-1)/4
*label var cd2w1 "01 Recode CD w1consp2: Even though we live in a democracy, a few people will always run things anyway."
*fre w1consp2 cd2w1

*gen cd3w1 = (w1consp3-1)/4
*label var cd3w1 "01 Recode CD w1consp3: The people who really run the country are not known to the voters."
*fre w1consp3 cd3w1

*gen cd4w1 = (w1consp4-1)/4
*label var cd4w1 "01 Recode CD w1consp4: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre w1consp4 cd4w1

*egen cdscalew1 = rowmean (cd1w1 cd2w1 cd3w1 cd4w1)
*label var cdscalew1 "Conspiractorial Predisposition Scale 0-1 (Avg of cd1w1 cd2w1 cd3w1 cd4w1) Wave 1"



*******************
***cdscalew4***
*******************

*fre w4consp1 w4consp2 w4consp3 w4consp4

*gen cd1w4 = (w4consp1-1)/4
*label var cd1w4 "01 Recode CD w4consp1: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1w4 w4consp1

*gen cd2w4 = (w4consp2-1)/4
*label var cd2w4 "01 Recode CD w4consp2: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2w4 w4consp2

*gen cd3w4 = (w4consp3-1)/4
*label var cd3w4 "01 Recode CD w4consp3: The people who really run the country are not known to the voters."
*fre cd3w4 w4consp3

*gen cd4w4 = (w4consp4-1)/4
*label var cd4w4 "01 Recode CD w4consp4: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4w4 w4consp4

*egen cdscalew4 = rowmean (cd1w4 cd2w4 cd3w4 cd4w4)
*label var cdscalew4 "Conspiractorial Predisposition Scale 0-1 (Avg of cd1w4 cd2w4 cd3w4 cd4w4) Wave 4"


*******************
***cdscalediff***
*******************

*gen cdscalediff = (cdscalew4 - cdscalew1)
*label var cdscalediff "Wave 4-Wave 1 CD Scale Difference Measure"

*fre cdscalediff 


*******************
***Republican***
*******************

*recode pid7 (1/3=0 "Democrat") (4=. ) (5/7=1 "Republican") (.=.), generate(repvdem_alt)
*fre pid7 repvdem_alt
*label var repvdem_alt "Republican Dummy without Independents"

*fre repvdem_alt repvdem_alt

*pwcorr repvdem_alt repvdem_alt

*fre repvdem_alt if completew4==1


*******************
***losevwin***
*******************

*gen losevwin=.
*replace losevwin=0 if repvdem_alt==0
*replace losevwin=1 if repvdem_alt==1
*label var losevwin "PID recoded such that Dem=0 (winner) and Rep=1 (loser)"
*label define losevwinl 1 "Loser(Rep)" 0 "Winner (Dem)"
*label value losevwin losevwinl

*fre losevwin

*pwcorr losevwin repvdem_alt


*******************
*** pididentitystrength ***
*******************

*fre w1repid4 w1demid4 w1indid4
*gen pidstrength_being = .
*replace pidstrength_being = 1 if w1repid4 == 4 | w1demid4 == 4 | w1indid4 == 4 
*replace pidstrength_being = 2 if w1repid4 == 3 | w1demid4 == 3 | w1indid4 == 3
*replace pidstrength_being = 3 if w1repid4 == 2 | w1demid4 == 2 | w1indid4 == 2 
*replace pidstrength_being = 4 if w1repid4 == 1 | w1demid4 == 1 | w1indid4 == 1 
*fre pidstrength_being
*label var pidstrength_being "combined How important is being a xxxx to you?"
*gen pidstrength_being01 = (pidstrength_being-1)/3
*label var pidstrength_being01 "0-1 combined How important is being a xxxx to you?"
*fre pidstrength_being01

	
*fre w1repid5 w1demid5 w1indid5
*gen pidstrength_term = .
*replace pidstrength_term = 1 if w1repid5 == 4 | w1demid5 == 4 | w1indid5 == 4
*replace pidstrength_term = 2 if w1repid5 == 3 | w1demid5 == 3 | w1indid5 == 3
*replace pidstrength_term = 3 if w1repid5 == 2 | w1demid5 == 2 | w1indid5 == 2
*replace pidstrength_term = 4 if w1repid5 == 1 | w1demid5 == 1 | w1indid5 == 1
*fre pidstrength_term
*label var pidstrength_term "combined How important is the term xxxx to you?"
*gen pidstrength_term01 = (pidstrength_termTEST-1)/3
*label var pidstrength_term01TEST "0-1 combined How important is the term xxxx to you?"
*fre pidstrength_term01TEST


*fre w1repid6 w1demid6 w1indid6
*gen pidstrength_we = .
*replace pidstrength_we = 1 if w1repid6 == 4 | w1demid6 == 4 | w1indid6 == 4
*replace pidstrength_we = 2 if w1repid6 == 3 | w1demid6 == 3 | w1indid6 == 3
*replace pidstrength_we = 3 if w1repid6 == 2 | w1demid6 == 2 | w1indid6 == 2
*replace pidstrength_we = 4 if w1repid6 == 1 | w1demid6 == 1 | w1indid6 == 1
*fre pidstrength_we
*label var pidstrength_we "combined When talking about xxxx, how often do you use we instead of they?"
*gen pidstrength_we01 = (pidstrength_we-1)/3
*label var pidstrength_we01 "0-1 combined When talking about xxxx, how often do you use we instead of they?"
*fre pidstrength_we01


*fre w1repid7 w1demid7 w1indid7
*gen pidstrength_extent = .
*replace pidstrength_extent = 1 if w1repid7 == 4 | w1demid7 == 4 | w1indid7 == 4
*replace pidstrength_extent = 2 if w1repid7 == 3 | w1demid7 == 3 | w1indid7 == 3
*replace pidstrength_extent = 3 if w1repid7 == 2 | w1demid7 == 2 | w1indid7 == 2
*replace pidstrength_extent = 4 if w1repid7 == 1 | w1demid7 == 1 | w1indid7 == 1
*fre pidstrength_extent
*label var pidstrength_extent "combined To what extent do you think of yourself as being a xxxx?"
*gen pidstrength_extent01 = (pidstrength_extent-1)/3
*label var pidstrength_extent01 "0-1 combined To what extent do you think of yourself as being a xxxx?"
*fre pidstrength_extent01

*egen pididentitystrength = rowmean (pidstrength_being01 pidstrength_term01 pidstrength_we01 pidstrength_extent01)
*label var pididentitystrength "Combined 0-1 Huddy measures"
*fre pididentitystrength

*gen pididentitystrengthDICH=.
*replace pididentitystrengthDICH=0 if pididentitystrength <.6
*replace pididentitystrengthDICH=1 if pididentitystrength >.6
*replace pididentitystrengthDICH=. if pididentitystrength==.

*fre pididentitystrength pididentitystrengthDICH


*******************
*** interest401 ***
*******************

*fre w1polint1

*gen interest_rev=.
*replace interest_rev = 1 if w1polint1==5
*replace interest_rev = 2 if w1polint1==4 
*replace interest_rev = 3 if w1polint1==3
*replace interest_rev = 4 if w1polint1==2
*replace interest_rev = 5 if w1polint1==1

*fre interest_rev interest_rev

*gen interest4 = .
*replace interest4 = 1 if interest_rev==1
*replace interest4 = 2 if interest_rev==2 | interest_rev==3
*replace interest4 = 3 if interest_rev==4
*replace interest4 = 4 if interest_rev==5

*gen interest401 = (interest4-1)/3

*fre interest401





*gen interest401DICH=.
*replace interest401DICH=0 if interest401 <.5
*replace interest401DICH=1 if interest401 >.5
*replace interest401DICH=. if interest401==.

*fre interest401 interest401DICH


*******************
*** relig ***
*******************

*fre w1rel1

*gen relig = (w1rel1-1)/6
*label var relig "How often do you attend religious services?"

*fre relig 


*******************
*** trustgovt01 ***
*******************

*fre w1trust1
*recode w1trust1 (1=4 "Almost always") (2=3 "Most of the time") (3=2 "Some of the time") (4=1 "Almost never") (.=.), generate(trust_g)
*label var trust_g "Rev: How often trust federal govt?"
*fre trust_g

*gen trustgovt01=.
*replace trustgovt01=(trust_g-1)/3.

*fre trustgovt01 



*******************
*** polknow ***
*******************


*fre w1civk1
*label var w1civk1 "What job or political office does Paul Ryan currently hold"
*gen know1w1 = .
*replace know1w1 = 1 if w1civk1==1
*replace know1w1 = 0 if w1civk1==2 | w1civk1==3 | w1civk1==4
*replace know1w1 =0 if w1civk1 ==.
*label define know1w1l 0 "wrong response/dk" 1 "correct response" 
*label value know1w1 know1w1l 
*label var know1w1 "0-1 PolKnow Dummy Recode of w1civk1: Speaker of the House"
*fre know1w1

*fre w1civk2
*label var w1civk2 "Which political party currently has the most members in the House of Representatives in Washington?"
*gen know2w1 = .
*replace know2w1 = 1 if w1civk2==2
*replace know2w1 = 0 if w1civk2==1 | w1civk2==3 | w1civk2==.
*label define know2w1l 0 "wrong response/dk" 1 "correct response" 
*label value know2w1 know2w1l 
*label var know2w1 "0-1 PolKnow Dummy Recode of w1civk2: House of Rep"
*fre know2w1

*fre w1civk3
*label var w1civk3 "How long is the term of office for a U.S. Senator?"
*gen know3w1 = .
*replace know3w1 = 1 if w1civk3==4
*replace know3w1 = 0 if w1civk3==1 | w1civk3==2 | w1civk3==3 | w1civk3==5 | w1civk3==.
*label define know3w1l 0 "wrong response/dk" 1 "correct response" 
*label value know3w1 know3w1l 
*label var know3w1 "0-1 PolKnow Dummy Recode of w1civk3: Senate Term"
*fre know3w1

*fre w1civk4
*label var w1civk4 "Whose responsibility is it to nominate judges to the Federal Courts?"
*gen know4w1 = .
*replace know4w1 = 1 if w1civk4==1
*replace know4w1 = 0 if w1civk4==2 | w1civk4==3 | w1civk4==.
*label define know4w1l 0 "wrong response/dk" 1 "correct response" 
*label value know4w1 know4w1l 
*label var know4w1 "0-1 PolKnow Dummy Recode of w1civk4: Nom judges to fed cts"
*fre know4w1

*gen polknow = (know1w1 + know2w1 + know3w1 + know4w1)/4
*label var polknow "0-1 Political Knowledge Index (Avg of 4 pol know items) Wave 1"

*fre polknow


*******************
*** educ ***
*******************

*fre degree
	
*recode degree (1/2=1 "Up to and including HS diploma or GED") (3/4=2 "Some college or Associate's") (5=3 "Bachelor's degree") (6/7=4 "Post-Bachelor's *degree") (.=.), generate(degree_alt)
*fre degree_alt
*label var degree_alt "Recode of degree: Highest level of school or degree achieved (4 categories)"
*gen educ = (degree_alt-1)/3
*label var educ "0-1 Recode of q136_alt: Level of education (4 category)"
*fre educ 
	

*******************
*** inc ***
*******************

*fre income
	
*recode income (1=.) (2=1 "Less than $10,000") (3=2 "$10,000-$14,999") (4=3 "$15,000-$24,999") (5=4 "$25,000-$34,999") (6=5 "$35,000-$49,999") (7=6 *"50,000-$74,999") (8=7 "$75,000-$99,999") (9=8 "$100,000-$149,999") (10=9 "$150,000-$199,999") (11=10 "$200,000 or more") (.=.), *generate(income10)
*fre income10
*gen inc = (income10-1)/9
*label var inc "0-1 Income recode of income10"

*fre inc


*******************
*** age01 ***
*******************

*fre age

* Recoded age to 0-1 (where 93 is the maximum age in the sample - 93-18=75)

*gen age01 = (age-18)/(75)
*label var age01 "0-1 Recode of age: Age"

*fre age01


*******************
*** female ***
*******************

*fre gender

*gen female=.
*replace female=0 if gender==1
*replace female=1 if gender==2
*replace female=. if gender==.
*label var female "Female Dummy Variable (Recode of q134)"
*label define femalel 0 "Male" 1 "Female" 
*label value female femalel

*fre female


*******************
*** white ***
*******************

*fre race

*gen white=.
*replace white = 1 if race ==4
*replace white = 0 if race ==1 | race ==2 | race ==3 | race ==5
*label var white "White Dummy Variable: Recode of race"
*label define whiteL 1 "White" 0 "Non-White" 
*label value white whiteL
*fre white

*******************
*** latino ***
*******************

*fre ethnicity

*gen latino=.
*replace latino = 1 if ethnicity == 1
*replace latino = 0 if ethnicity == 2
*replace latino =. if ethnicity == .
*label var latino "Spanish, Hispanic, or Latino Dummy Variable: Recode of q139"
*label define latinol 1 "Yes" 0 "No" 
*label value latino latinol
*fre latino


*************************
*************************
*** STUDY 2 CCES 2016 ***
*************************
*************************

*use “Study 2 CCES 2016.dta”


*******************
***tookpost***
*******************

*fre tookpost

*NOTE: tookpost=1 if completed post election survey 

*******************
***cdscale_pre***
*******************

*fre UMN322 UMN323 UMN324 UMN325
	
*recode UMN322 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp1_pre)
*label var consp1_pre "Reverse Recode CD UMN322: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_pre = (consp1_pre-1)/4
*label var cd1_pre "01 Recode CD consp1_pre: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1_pre consp1_pre

*recode UMN323 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp2_pre)
*label var consp2_pre "01 Recode CD UMN323: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_pre = (consp2_pre-1)/4
*label var cd2_pre "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2_pre consp2_pre

*recode UMN324 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp3_pre)
*label var consp3_pre "Reverse Recode CD UMN324: The people who really run the country are not known to the voters."

*gen cd3_pre = (consp3_pre-1)/4
*label var cd3_pre "01 Recode CD consp3_pre: The people who really run the country are not known to the voters."
*fre cd3_pre consp3_pre

*recode UMN325 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp4_pre)
*label var consp4_pre "Reverse Recode CD UMN325: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_pre = (consp4_pre-1)/4
*label var cd4_pre "01 Recode CD consp4_pre: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4_pre consp4_pre

*egen cdscale_pre = rowmean (cd1_pre cd2_pre cd3_pre cd4_pre)
*label var cdscale_pre "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_pre)"
*fre cdscale_pre
	

*******************
***cdscale_post***
*******************

*fre UMN422 UMN423 UMN424 UMN425
	
*recode UMN422 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp1_post)
*label var consp1_post "Reverse Recode CD UMN422: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_post = (consp1_post-1)/4
*label var cd1_post "01 Recode CD consp1_post: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1_post consp1_post

*recode UMN423 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp2_post)
*label var consp2_post "01 Recode CD UMN423: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_post = (consp2_post-1)/4
*label var cd2_post "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2_post consp2_post

*recode UMN424 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp3_post)
*label var consp3_post "Reverse Recode CD UMN424: The people who really run the country are not known to the voters."

*gen cd3_post = (consp3_post-1)/4
*label var cd3_post "01 Recode CD consp3_post: The people who really run the country are not known to the voters."
*fre cd3_post consp3_post

*recode UMN425 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") * * (.=.), gen(consp4_post)
*label var consp4_post "Reverse Recode CD UMN425: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_post = (consp4_post-1)/4
*label var cd4_post "01 Recode CD consp4_post: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4_post consp4_post

*egen cdscale_post = rowmean (cd1_post cd2_post cd3_post cd4_post)
*label var cdscale_post "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_post)"
*fre cdscale_post

*******************
***cdscalediff***
*******************

*gen cdscalediff = (cdscale_post - cdscale_pre)
*label var cdscalediff "Post-Pre CD Scale Difference Measure"
*fre cdscalediff

*******************
***repvdem***
*******************

*fre pid7

*recode pid7 (1/3=0 "Democrat") (4=. ) (5/7=1 "Republican") (8=.) (.=.), generate(repvdem)
*fre pid7 repvdem
*label var repvdem "Republican Dummy without Independents: Recode of pid7"

*******************
***losevwin***
*******************


*gen losevwin=.
*replace losevwin=0 if repvdem==1
*replace losevwin=1 if repvdem==0
*label var losevwin "PID recoded such that Rep=0 (winner) and Dem=1 (loser)"
*label define losevwinl 1 "Loser(Dem)" 0 "Winner (Rep)"
*label value losevwin losevwin1

*fre losevwin repvdem


*******************
*** pidstrength01***
*******************

*fre pid7

*gen pidstrength01=.
*recode pidstrength01=0 if pid7==3 | pid7==5
*recode pidstrength01=.5 if pid7==2 | pid7==6
*recode pidstrength01=1 if pid7==1 | pid7==7
*label define pidstrength01l 0 "lean D or R" .5 "not very strong D or R" 1 “strong D or R”
*label value pidstrength01 pidstrength01l

*fre pid7 pidstrength01


*******************
***interest*** 
*******************

*fre newsint

*recode newsint (1=4 "Most of the time") (2=3 "Some of the time") (3=2 "Only now and then") (4=1 "Hardly at all") (7/8=.) (.=.), generate(interest_rev)
*label var interest_rev "Reverse code of interest_rev: Interest in news on national govt and politics"
*fre interest_rev

*gen interest = (interest_rev-1)/3
*label var interest "0-1: Interest in news on govt and politics"
*fre interest

*******************
***relig*** 
*******************

*fre pew_churatd

*recode pew_churatd (1=6 "More than once a week") (2=5 "Once a week") (3=4 "Once or twice a month") (4=3 "A few times a year") (5=2 "Seldom") (6=1 *"Never") (7=.) (.=.), gen(relig_rev)
*label var relig_rev "Reverse code of church pew_churatd"
*gen relig = (relig_rev-1)/5
*fre relig 
*label var relig "How often do you attend religious services?"


*******************
***trust_govt*** 
*******************

*fre UMN331
*recode UMN331 (1=4 "Almost always") (2=3 "Most of the time") (3=2 "Some of the time") (4=1 "Almost never") (.=.), generate(trust_g)
*fre UMN331 trust_g
*label var trust_g "Rev: How often trust federal govt?"

*gen trust_govt = (trust_g-1)/3
*label var trust_govt "0-1 Recode of trust_g: How often trust federal govt"
*fre trust_govt
	
*******************
***polknow*** 
*******************

*fre UMN326 
	
*gen know1 = .
*replace know1 = 1 if UMN326==3
*replace know1 = 0 if UMN326==1 | UMN326==2 | UMN326==4
*replace know1 =0 if UMN326 ==. | UMN326==8
*label define know1l 0 "wrong response/dk" 1 "correct response" 
*label value know1 know1l 
*label var know1 "0-1 PolKnow Dummy Recode of UMN326: John Roberts' job"
*fre know1


*fre UMN327 
*gen know2 = .
*replace know2 = 1 if UMN327==2
*replace know2 = 0 if UMN327==1 | UMN327==3 | UMN327==4
*replace know2 =0 if UMN327 ==. | UMN327==8
*label define know2l 0 "wrong response/dk" 1 "correct response" 
*label value know2 know2l 
*label var know2 "0-1 PolKnow Dummy Recode of UMN327: Speaker of the House"
*fre know2

*fre UMN328 
*gen know3 = .
*replace know3 = 1 if UMN328==1
*replace know3 = 0 if UMN328==2 | UMN328==3 | UMN328==4
*replace know3 =0 if UMN328 ==. | UMN328==8
*label define know3l 0 "wrong response/dk" 1 "correct response" 
*label value know3 know3l 
*label var know3 "0-1 PolKnow Dummy Recode of UMN328: Nom. Judges"
*fre know3

*fre UMN329
*gen know4 = .
*replace know4 = 1 if UMN329==4
*replace know4 = 0 if UMN329==1 | UMN329==3 | UMN329==2
*replace know4 =0 if UMN329 ==. | UMN329==8
*label define know4l 0 "wrong response/dk" 1 "correct response" 
*label value know4 know4l 
*label var know4 "0-1 PolKnow Dummy Recode of UMN329: Law Constitutional"
*fre know4

*fre UMN330
*gen know5 = .
*replace know5 = 1 if UMN330==3
*replace know5 = 0 if UMN330==1 | UMN330==2 | UMN330==4
*replace know5 =0 if UMN330 ==. | UMN330==8
*label define know5l 0 "wrong response/dk" 1 "correct response" 
*label value know5 know5l 
*label var know5 "0-1 PolKnow Dummy Recode of UMN330: Sec. of State"
*fre know5

*egen polknow = rowmean(know1 know2 know3 know4 know5)
*label var polknow "0-1 Political Knowledge Index (Avg of 5 polknow items)"
*fre polknow
	

*******************
***educ01***
*******************

*fre educ

*recode educ (1/2=1 "Up to and including HS diploma or GED") (3/4=2 "Some college or Associate's") (5=3 "Bachelor's degree") (6=4 "Post-Bachelor's *degree") (.=.), generate(educ_alt)

*fre educ_alt
*label var educ_alt "Recode of educ: Highest level of school or degree achieved (4 categories)"
*gen educ01 = (educ_alt-1)/3
*label var educ01 "0-1 Recode of educ_alt: Level of education (4 category)"
*fre educ01 
*fre educ educ01


*******************
***inc*** 
*******************

*fre faminc

*recode faminc (97/98=.) (1=1 "Less than $10,000") (2=2 "$10,000-$19,999") (3=3 "$20,000-$29,999") (4=4 "$30,000-$39,999") (5=5 "$40,000-$49,999") * * (6/8=6 "50,000-$79,999") (9=7 "$80,000-$99,999") (10/11=8 "$100,000-$149,999") (12=9 "$150,000-$199,999") (13/16=10 "$200,000 or more") (31=9 *"$150,000-$199,999") (.=.), generate(income10)

*fre income10
	
*gen inc = (income10-1)/9
*label var inc "0-1 Income recode of income10: Family Income"
*fre inc

*pwcorr inc income10, sig obs

*******************
***age01*** 
*******************

*fre birthyr

*gen age = 2016-birthyr
*label var age "Age: 2016-birthyr"
*fre age

*gen age01 = (age-18)/(71)
*label var age01 "0-1 Recode of age: Age"
*fre age01
*fre age01 age


*******************
***female*** 
*******************

*fre gender

*gen female=.
*replace female=0 if gender==1
*replace female=1 if gender==2
*replace female=. if gender==.
*label var female "Female Dummy Variable (Recode of gender)"
*label define femalel 0 "Male" 1 "Female" 
*label value female femalel
*fre female gender


*******************
***white*** 
*******************

*fre race
	
*gen white=.
*replace white = 1 if race ==1
*replace white = 0 if race !=1
*label var white "White Dummy Variable: Recode of race"
*label define whiteL 1 "White" 0 "Non-White" 
*label value white whiteL
*fre white


*******************
***latino***
*******************

*fre hispanic

*gen latino=.
*replace latino = 1 if hispanic == 1 
*replace latino = 1 if race==3
*replace latino = 0 if hispanic == 2
*label var latino "Spanish, Hispanic, or Latino Dummy Variable: Recode of hispanic"
*label define latinol 1 "Yes" 0 "No" 
*label value latino latinol
*fre latino 



*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************


*use “Study 3 CCES UMN 2018.dta”


*******************
***tookpost***
*******************

*fre tookpost

*NOTE: tookpost = 2 if completed post election survey

*fre tookpost

*gen tookpostdum=.
*replace tookpostdum=0 if tookpost==1
*replace tookpostdum=1 if tookpost==2
*label var tookpostdum "Tookpost dummy variable"
*label define tookpostduml 1 "Yes" 0 "No"
*label value tookpostdum tookpostduml

*fre tookpost tookposdum


*******************
***cdscale_pre***
*******************

*fre UMN315 UMN316 UMN317 UMN318
	
*recode UMN315 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp1_pre)
*label var consp1_pre "Reverse Recode CD UMN315: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_pre = (consp1_pre-1)/4
*label var cd1_pre "01 Recode CD consp1_pre: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1_pre consp1_pre

*recode UMN316 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp2_pre)
*label var consp2_pre "01 Recode CD UMN316: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_pre = (consp2_pre-1)/4
*label var cd2_pre "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2_pre consp2_pre

*recode UMN317 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp3_pre)
*label var consp3_pre "Reverse Recode CD UMN317: The people who really run the country are not known to the voters."

*gen cd3_pre = (consp3_pre-1)/4
*label var cd3_pre "01 Recode CD consp3_pre: The people who really run the country are not known to the voters."
*fre cd3_pre consp3_pre

*recode UMN318 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")  *(9=.) (.=.), gen(consp4_pre)
*label var consp4_pre "Reverse Recode CD UMN318: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_pre = (consp4_pre-1)/4
*label var cd4_pre "01 Recode CD consp4_pre: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4_pre consp4_pre

*egen cdscale_pre = rowmean (cd1_pre cd2_pre cd3_pre cd4_pre)
*label var cdscale_pre "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_pre)"
*fre cdscale_pre
	
	

*******************
***cdscale_post***
*******************

*fre UMN413 UMN414 UMN415 UMN416 

*recode UMN413 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp1_post)
*label var consp1_post "Reverse Recode CD UMN413: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_post = (consp1_post-1)/4
*label var cd1_post "01 Recode CD consp1_post: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1_post consp1_post

*recode UMN414 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")
*(9=.) (.=.), gen(consp2_post)
*label var consp2_post "01 Recode CD UMN414: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_post = (consp2_post-1)/4
*label var cd2_post "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2_post consp2_post

*recode UMN415 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")
*(9=.) (.=.), gen(consp3_post)
*label var consp3_post "Reverse Recode CD UMN415: The people who really run the country are not known to the voters."

*gen cd3_post = (consp3_post-1)/4
*label var cd3_post "01 Recode CD consp3_post: The people who really run the country are not known to the voters."
*fre cd3_post consp3_post

*recode UMN416 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp4_post)
*label var consp4_post "Reverse Recode CD UMN416: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_post = (consp4_post-1)/4
*label var cd4_post "01 Recode CD consp4_post: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4_post consp4_post

*egen cdscale_post = rowmean (cd1_post cd2_post cd3_post cd4_post)
*label var cdscale_post "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_post)"
*fre cdscale_post



*******************
***cdscalediff***
*******************

*gen cdscalediff = (cdscale_post - cdscale_pre)
*label var cdscalediff "Post-Pre CD Scale Difference Measure"
*fre cdscalediff

	

*******************
***repvdem***
*******************

*fre pid7

*recode pid7 (1/3=0 "Democrat") (4=. ) (5/7=1 "Republican") (8=.) (99=.) (.=.), generate(repvdem)
*fre pid7 repvdem
*label var repvdem "Republican Dummy without Independents: Recode of pid7"

*fre repvdem 


*******************
***losevwin***
*******************

*gen losevwin=.
*replace losevwin=0 if repvdem==0
*replace losevwin=1 if repvdem==1
*label var losevwin "PID recoded such that Dem=0 (winner) and Rep=1 (loser)"
*label define losevwinl 1 "Loser(Rep)" 0 "Winner (Dem)"
*label value losevwin losevwin1

*fre losevwin


*******************
***pididentitystrength***
*******************

*fre UMN367 UMN368 UMN368 UMN370

*recode UMN367 (1=4 "Extremely important") (2=3 "Very important") (3=2 "Not very important") (4=1 "Not important at all") (9=.) (.=.), *generate(pidstrength_being)
*label var pidstrength_being "Reverse code of UMN367: Importance of being D or R"
*fre pidstrength_being

*fre pidstrength_being


*gen pidstrength_being01 = (pidstrength_being -1)/3
*label var pidstrength_being01 "0-1: Importance of being D or R"

*pwcorr pidstrength_being01 pidstrength_being01

*fre pidstrength_being01


*recode UMN368 (1=4 "Extremely well") (2=3 "Very well") (3=2 "Not very well") (4=1 "Not at all") (9=.) (.=.), generate(pidstrength_describe)
*label var pidstrength_describe "Reverse code of UMN368: How well does D or R desribe you"
*fre pidstrength_describe 


*gen pidstrength_describe01 = (pidstrength_describe -1)/3
*label var pidstrength_describe01 "0-1: How well does D or R desribe you"

*fre pidstrength_describe01


*recode UMN369 (1=4 "A great deal") (2=3 "Somewhat") (3=2 "Very little") (4=1 "Not at all") (9=.) (.=.), generate(pidstrength_extent)
*label var pidstrength_extent "Reverse code of UMN368: To what extent refer as D or R"
*fre pidstrength_extent 

*gen pidstrength_extent01 = (pidstrength_extent -1)/3
*label var pidstrength_extent01 "0-1: To what extent refer as D or R"

*fre pidstrength_extent01


*gen pidstrength_we=.
*replace pidstrength_we=4 if UMN370==1
*replace pidstrength_we=3 if UMN370==2 | UMN370==3
*replace pidstrength_we=2 if UMN370==4
*replace pidstrength_we=1 if UMN370==5
*label var pidstrength_we "Reverse code of UMN370: Use we instead of they"

*fre pidstrength_we

*gen pidstrength_we01 = (pidstrength_we -1)/3
*label var pidstrength_we01 "0-1: Use we instead of they"


*egen pididentitystrength = rowmean (pidstrength_being01 pidstrength_describe01 pidstrength_extent01 pidstrength_we01)
*label var pididentitystrength "Combined 0-1 Huddy measures"





*******************
*** interest01_cces*** 
*******************

*fre newsint

*recode newsint (1=4 "Most of the time") (2=3 "Some of the time") (3=2 "Only now and then") (4=1 "Hardly at all") (7/8=.) (.=.), generate(interest_cces)
*label var interest_cces "Reverse code of newsint_rev: Interest in news on national govt and politics"
*fre interest_cces

*gen interest01_cces = (interest_cces -1)/3
*label var interest01_cces "0-1: Interest in news on govt and politics"
*fre interest01_cces



*******************
***relig*** 
*******************

*fre pew_churatd

*recode pew_churatd (1=6 "More than once a week") (2=5 "Once a week") (3=4 "Once or twice a month") (4=3 "A few times a year") (5=2 "Seldom") (6=1 *"Never") (7/8=.) (.=.), gen(relig_rev)
*label var relig_rev "Reverse code of church pew_churatd"
*gen relig = (relig_rev-1)/5
*fre relig 
*label var relig "How often do you attend religious services?"


*******************
***trust_govt*** 
*******************


*fre UMN338
*recode UMN338 (1=4 "Almost always") (2=3 "Most of the time") (3=2 "Some of the time") (4=1 "Almost never") (.=.), generate(trust_g)
*fre UMN338 trust_g
*label var trust_g "Rev UMN338: How often trust federal govt?"
*fre trust_g

*gen trust_govt = (trust_g-1)/3
*label var trust_govt "0-1 Recode of trust_g: How often trust federal govt"
*fre trust_govt

	
*******************
***polknow*** 
*******************

*fre UMN333 
*gen know1 = .
*replace know1 = 1 if UMN333==3
*replace know1 = 0 if UMN333==1 | UMN333==2 | UMN333==4
*replace know1 =0 if UMN333 ==. | UMN333==8
*label define know1l 0 "wrong response/dk" 1 "correct response" 
*label value know1 know1l 
*label var know1 "0-1 PolKnow Dummy Recode of UMN333: John Roberts' job"
*fre know1


*fre UMN334 
*gen know2 = .
*replace know2 = 1 if UMN334==2
*replace know2 = 0 if UMN334==1 | UMN334==3 | UMN334==4
*replace know2 =0 if UMN334 ==. | UMN334==8
*label define know2l 0 "wrong response/dk" 1 "correct response" 
*label value know2 know2l 
*label var know2 "0-1 PolKnow Dummy Recode of UMN334: Speaker of the House"
*fre know2

*fre UMN335 
*gen know3 = .
*replace know3 = 1 if UMN335==1
*replace know3 = 0 if UMN335==2 | UMN335==3 | UMN335==4
*replace know3 =0 if UMN335 ==. | UMN335==8
*label define know3l 0 "wrong response/dk" 1 "correct response" 
*label value know3 know3l 
*label var know3 "0-1 PolKnow Dummy Recode of UMN335: Nom. Judges"
*fre know3

*fre UMN336
*gen know4 = .
*replace know4 = 1 if UMN336==4
*replace know4 = 0 if UMN336==1 | UMN336==3 | UMN336==2
*replace know4 =0 if UMN336 ==. | UMN336==8
*label define know4l 0 "wrong response/dk" 1 "correct response" 
*label value know4 know4l 
*label var know4 "0-1 PolKnow Dummy Recode of UMN336: Law Constitutional"
*fre know4

*fre UMN337
*gen know5 = .
*replace know5 = 1 if UMN337==1
*replace know5 = 0 if UMN337==2 | UMN337==3 | UMN337==4
*replace know5 =0 if UMN337 ==. | UMN337==8
*label define know5l 0 "wrong response/dk" 1 "correct response" 
*label value know5 know5l 
*label var know5 "0-1 PolKnow Dummy Recode of UMN337: Sec. of State"
*fre know5

*egen polknow = rowmean(know1 know2 know3 know4 know5)
*label var polknow "0-1 Political Knowledge Index (Avg of 5 polknow items)"
*fre polknow


*******************
***educ01***
*******************

*fre educ

*recode educ (1/2=1 "Up to and including HS diploma or GED") (3/4=2 "Some college or Associate's") (5=3 "Bachelor's degree") (6=4 "Post-Bachelor's *degree") (.=.), generate(educ_alt)
*fre educ_alt
*label var educ_alt "Recode of educ: Highest level of school or degree achieved (4 categories)"
*gen educ01 = (educ_alt-1)/3
*label var educ01 "0-1 Recode of educ_alt: Level of education (4 category)"
*fre educ01


*******************
***inc*** 
*******************

*fre faminc_new

*recode faminc_new (97/98=.) (1=1 "Less than $10,000") (2=2 "$10,000-$19,999") (3=3 "$20,000-$29,999") (4=4 "$30,000-$39,999") (5=5 "$40,000-*$49,999") (6/8=6 "50,000-$79,999") (9=7 "$80,000-$99,999") (10/11=8 "$100,000-$149,999") (12=9 "$150,000-$199,999") (13/16=10 "$200,000 or *more") (.=.), generate(income10)

*fre income10
	
*gen inc = (income10-1)/9
*label var inc "0-1 Income recode of income10: Family Income"
*fre inc


*******************
***age01*** 
*******************

*fre birthyr

*gen age = 2018-birthyr
*label var age "Age: 2018-birthyr"
*fre age
*gen age01 = (age-18)/(75)
*label var age01 "0-1 Recode of age: Age"
*fre age01


*******************
***female*** 
*******************

*fre gender

*gen female=.
*replace female=0 if gender==1
*replace female=1 if gender==2
*replace female=. if gender==.
*label var female "Female Dummy Variable (Recode of gender)"
*label define femalel 0 "Male" 1 "Female" 
*label value female femalel

*fre female gender


*******************
***white*** 
*******************

*fre race

*gen white=.
*replace white = 1 if race ==1
*replace white = 0 if race !=1
*label var white "White Dummy Variable: Recode of race"
*label define whiteL 1 "White" 0 "Non-White" 
*label value white whiteL
*fre white


*******************
***latino***
*******************

*fre hispanic

*gen latino=.
*replace latino = 0 if hispanic == 2
*replace latino = 1 if race==3 | hispanic==1 
*label var latino "Spanish, Hispanic, or Latino Dummy Variable: Recode of hispanic"
*label define latinol 1 "Yes" 0 "No" 
*label value latino latinol
*fre latino





******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

*******************
***tookpost***
*******************

*fre tookpost

*NOTE: tookpost = 2 if completed post election survey

*gen tookpostdum=.
*replace tookpostdum=0 if tookpost==1
*replace tookpostdum=1 if tookpost==2
*label var tookpostdum "Tookpost dummy variable"
*label define tookpostduml 1 "Yes" 0 "No"
*label value tookpostdum tookpostduml

*fre tookpost tookpostdum


*******************
***cdscale_pre***
*******************

*fre CPC306 CPC307 CPC308 CPC309

*recode CPC306 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp1_pre)
*label var consp1_pre "Reverse Recode CD CPC306: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_pre = (consp1_pre-1)/4
*label var cd1_pre "01 Recode CD consp1_pre: Much of our lives are being controlled by plots hatched in secret places"

*fre cd1_pre consp1_pre

*recode CPC307 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp2_pre)
*label var consp2_pre "01 Recode CD CPC307: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_pre = (consp2_pre-1)/4
*label var cd2_pre "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."

*fre cd2_pre consp2_pre

*recode CPC308 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp3_pre)
*label var consp3_pre "Reverse Recode CD CPC308: The people who really run the country are not known to the voters."

*gen cd3_pre = (consp3_pre-1)/4
*label var cd3_pre "01 Recode CD consp3_pre: The people who really run the country are not known to the voters."

*fre cd3_pre consp3_pre

*recode CPC309 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp4_pre)
*label var consp4_pre "Reverse Recode CD CPC309: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_pre = (consp4_pre-1)/4
*label var cd4_pre "01 Recode CD consp4_pre: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*fre cd4_pre consp4_pre

*egen cdscale_pre = rowmean (cd1_pre cd2_pre cd3_pre cd4_pre)
*label var cdscale_pre "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_pre)"

*fre cdscale_pre
*sum cdscale_pre

*******************
***cdscale_post***
*******************

*fre CPC406 CPC407 CPC408 CPC409

*recode CPC406 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp1_post)
*label var consp1_post "Reverse Recode CD CPC406: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1_post = (consp1_post-1)/4
*label var cd1_post "01 Recode CD consp1_post: Much of our lives are being controlled by plots hatched in secret places"

*fre cd1_post consp1_post

*recode CPC407 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp2_post)
*label var consp2_post "01 Recode CD CPC407: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2_post = (consp2_post-1)/4
*label var cd2_post "01 Recode CD consp2_pre: Even though we live in a democracy, a few people will always run things anyway."

*fre cd2_post consp2_post

*recode CPC408 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp3_post)
*label var consp3_post "Reverse Recode CD CPC408: The people who really run the country are not known to the voters."

*gen cd3_post = (consp3_post-1)/4
*label var cd3_post "01 Recode CD consp3_post: The people who really run the country are not known to the voters."

*fre cd3_post consp3_post

*recode CPC409 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(consp4_post)
*label var consp4_post "Reverse Recode CD CPC409: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4_post = (consp4_post-1)/4
*label var cd4_post "01 Recode CD consp4_post: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*fre cd4_post consp4_post

*egen cdscale_post = rowmean (cd1_post cd2_post cd3_post cd4_post)
*label var cdscale_post "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_post)"

*fre cdscale_post
*sum cdscale_post
	


*******************
***cdscalediff***
*******************

*gen cdscalediff = (cdscale_post - cdscale_pre)
*label var cdscalediff "Post-Pre CD Scale Difference Measure"

*fre cdscalediff
*sum cdscalediff

*******************
***repvdem***
*******************

*fre pid7

*recode pid7 (1/3=0 "Democrat") (4=. ) (5/7=1 "Republican") (8=.) (98=.) (99=.) (.=.), generate(repvdem)
*fre pid7 repvdem
*label var repvdem "Republican Dummy without Independents: Recode of pid7"

*fre repvdem

*******************
***losevwin***
*******************

*gen losevwin=.
*replace losevwin=0 if repvdem==0
*replace losevwin=1 if repvdem==1
*label var losevwin "PID recoded such that Dem=0 (winner) and Rep=1 (loser)"
*label define losevwinl 1 "Loser(Rep)" 0 "Winner (Dem)"
*label value losevwin losevwin1

*fre losevwin 


*******************
***pididentitystrength_pre***
*******************

*fre CPC310 CPC311 CPC312 CPC313

*recode CPC310 (1=4 "Extremely important") (2=3 "Very important") (3=2 "Not very important") (4=1 "Not important at all") (9=.) (.=.), *generate(pidstrength_being)
*label var pidstrength_being "Reverse code of UMN367: Importance of being D or R"
*fre pidstrength_being

*fre pidstrength_being

*gen pidstrength_being01 = (pidstrength_being -1)/3
*label var pidstrength_being01 "0-1: Importance of being D or R"


*fre pidstrength_being01


*recode CPC311 (1=4 "Extremely well") (2=3 "Very well") (3=2 "Not very well") (4=1 "Not at all") (9=.) (.=.), generate(pidstrength_describe)
*label var pidstrength_describe "Reverse code of UMN368: How well does D or R desribe you"
*fre pidstrength_describe 


*gen pidstrength_describe01 = (pidstrength_describe -1)/3
*label var pidstrength_describe01 "0-1: How well does D or R desribe you"

*fre pidstrength_describe01


*recode CPC312 (1=4 "A great deal") (2=3 "Somewhat") (3=2 "Very little") (4=1 "Not at all") (9=.) (.=.), generate(pidstrength_extent)
*label var pidstrength_extent "Reverse code of UMN368: To what extent refer as D or R"
*fre pidstrength_extent 

*gen pidstrength_extent01 = (pidstrength_extent -1)/3
*label var pidstrength_extent01 "0-1: To what extent refer as D or R"

*fre pidstrength_extent01


*gen pidstrength_we=.
*replace pidstrength_we=4 if CPC312 ==1
*replace pidstrength_we=3 if CPC312 ==2 | CPC312 ==3
*replace pidstrength_we=2 if CPC312 ==4
*replace pidstrength_we=1 if CPC312 ==5
*label var pidstrength_we "Reverse code of CPC312: Use we instead of they"

*fre pidstrength_we

*gen pidstrength_we01 = (pidstrength_we -1)/3
*label var pidstrength_we01 "0-1: Use we instead of they"


*egen pididentitystrength_pre = rowmean (pidstrength_being01 pidstrength_describe01 pidstrength_extent01 pidstrength_we01)
*label var pididentitystrength_pre "Combined 0-1 Huddy measures"

*fre pididentitystrength_pre

*gen pididentitystrength_preDICH=.
*replace pididentitystrength_preDICH=0 if pididentitystrength_pre < .7
*replace pididentitystrength_preDICH=1 if pididentitystrength_pre > .7
*replace pididentitystrength_preDICH=. if pididentitystrength_pre==.

*fre pididentitystrength_pre pididentitystrength_preDICH



*******************
*** interest*** 
*******************

*fre newsint

*recode newsint (1=4 "Most of the time") (2=3 "Some of the time") (3=2 "Only now and then") (4=1 "Hardly at all") (7/8=.) (.=.), generate(newsintflip)
*label var newsintflip "Reverse code of newsint: Interest in news on national govt and politics"
*fre newsintflip

*gen interest = (newsintflip _cces -1)/3
*label var interest "0-1: Interest in news on govt and politics"
*fre interest


*gen interestDICH=.
*replace interestDICH=0 if interest <.7
*replace interestDICH=1 if interest >.7
*replace interestDICH=. if interest==.

*fre interest interestDICH



*******************
***relig*** 
*******************

*fre pew_churatd

*recode pew_churatd (1=6 "More than once a week") (2=5 "Once a week") (3=4 "Once or twice a month") (4=3 "A few times a year") (5=2 "Seldom") (6=1 *"Never") (7/8=.) (.=.), gen(relig_rev)
*label var relig_rev "Reverse code of church pew_churatd"
*gen relig = (relig_rev-1)/5
*label var relig "How often do you attend religious services?"

*fre relig 


*******************
***educ01***
*******************


*fre educ

*recode educ (1/2=1 "Up to and including HS diploma or GED") (3/4=2 "Some college or Associate's") (5=3 "Bachelor's degree") (6=4 "Post-Bachelor's *degree") (.=.), generate(educ_alt)
*fre educ_alt
*label var educ_alt "Recode of educ: Highest level of school or degree achieved (4 categories)"

*gen educ01 = (educ_alt-1)/3
*label var educ01 "0-1 Recode of educ_alt: Level of education (4 category)"
*fre educ educ_alt educ01


*******************
***inc*** 
*******************

*fre faminc_new

*recode faminc_new (97/98=.) (1=1 "Less than $10,000") (2=2 "$10,000-$19,999") (3=3 "$20,000-$29,999") (4=4 "$30,000-$39,999") (5=5 "$40,000-*$49,999") (6/8=6 "50,000-$79,999") (9=7 "$80,000-$99,999") (10/11=8 "$100,000-$149,999") (12=9 "$150,000-$199,999") (13/16=10 "$200,000 or *more") (.=.), generate(income10)

*fre income10
	
*gen inc = (income10-1)/9
*label var inc "0-1 Income recode of income10: Family Income"
*fre inc



*******************
***age01*** 
*******************

*fre birthyr

*gen age = 2018-birthyr
*label var age "Age: 2018-birthyr"
*fre age

*gen age01 = (age-18)/(75)
*label var age01 "0-1 Recode of age: Age"
*fre age01
*pwcorr age01 age


*******************
***female*** 
*******************

*fre gender

*gen female=.
*replace female=0 if gender==1
*replace female=1 if gender==2
*replace female=. if gender==.
*label var female "Female Dummy Variable (Recode of gender)"
*label define femalel 0 "Male" 1 "Female" 
*label value female femalel
*fre female gender

*******************
***white*** 
*******************

*fre race
*gen white=.
*replace white = 1 if race ==1
*replace white = 0 if race !=1
*label var white "White Dummy Variable: Recode of race"
*label define whiteL 1 "White" 0 "Non-White" 
*label value white whiteL
*fre white


*******************
***latino***
*******************

*fre hispanic

*gen latino=.
*replace latino = 0 if hispanic == 2
*replace latino = 1 if race==3 | hispanic==1 
*label var latino "Spanish, Hispanic, or Latino Dummy Variable: Recode of hispanic"
*label define latinol 1 "Yes" 0 "No" 
*label value latino latinol
*fre latino





********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

*******************
***tookpost***
*******************

*fre tookpost

*NOTE: tookpost = 2 if completed post election survey

*fre tookpost

*gen tookpostdum=.
*replace tookpostdum=0 if tookpost==1
*replace tookpostdum=1 if tookpost==2
*label var tookpostdum "Tookpost dummy variable"
*label define tookpostduml 1 "Yes" 0 "No"
*label value tookpostdum tookpostduml

*fre tookpost tookpostdum



*******************
***cdscale_pre***
*******************

*fre UDE312 UDE313 UDE314 UDE315
	
*recode UDE312 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(UDE312_rev)
*label var UDE312_rev "Reverse Recode CD UDE312: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1 = (UDE312_rev-1)/4
*label var cd1 "01 Recode CD UDE312_rev: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1

*recode UDE313 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(UDE313_rev)
*label var UDE313_rev "01 Recode CD UDE313: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2 = (UDE313_rev-1)/4
*label var cd2 "01 Recode CD UDE313_rev: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2

*recode UDE314 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") 
*(9=.) (.=.), gen(UDE314_rev)
*label var UDE314_rev "Reverse Recode CD UDE314 The people who really run the country are not known to the voters."

*gen cd3 = (UDE314_rev-1)/4
*label var cd3 "01 Recode CD UDE314_rev: The people who really run the country are not known to the voters."
*fre cd3

*recode UDE315 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")
*(9=.) (.=.), gen(UDE315_rev)
*label var UDE315_rev "Reverse Recode CD UDE315: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4 = (UDE315_rev-1)/4
*label var cd4 "01 Recode CD UDE315_rev: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4 

*egen cdscale_pre = rowmean (cd1 cd2 cd3 cd4)
*label var cdscale_pre "Conspiractorial Predisposition Scale 0-1 (Avg of cd1-4_pre)"
*fre cdscale_pre


	

*******************
***cdscale_post***
*******************

*fre UDE412 UDE413 UDE414 UDE415
	
*recode UDE412 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")
*(9=.) (.=.), gen(UDE412_rev)
*label var UDE412_rev "Reverse Recode CD UDE412: Much of our lives are being controlled by plots hatched in secret places"

*gen cd1post = (UDE412_rev-1)/4
*label var cd1post "01 Recode CD UDE412_rev: Much of our lives are being controlled by plots hatched in secret places"
*fre cd1post


*recode UDE413 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree")
*(9=.) (.=.), gen(UDE413_rev)
*label var UDE413_rev "01 Recode CD UDE414: Even though we live in a democracy, a few people will always run things anyway."

*gen cd2post = (UDE413_rev-1)/4
*label var cd2post "01 Recode CD UDE414_rev: Even though we live in a democracy, a few people will always run things anyway."
*fre cd2post


*recode UDE414 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") *(9=.) (.=.), gen(UDE414_rev)
*label var UDE414_rev "Reverse Recode CD UDE414 The people who really run the country are not known to the voters."

*gen cd3post = (UDE414_rev-1)/4
*label var cd3post "01 Recode CD UDE414_rev: The people who really run the country are not known to the voters."
*fre cd3post


*recode UDE415 (1=5 "Strongly agree") (2=4 "Somewhat agree") (3=3 "Neither agree nor disagree") (4=2 "Somewhat disagree") (5=1 "Strongly disagree") *(9=.) (.=.), gen(UDE415_rev)
*label var UDE415_rev "Reverse Recode CD UDE415: Big events like wars, economic recessions,and the outcomes of elections are controlled..."

*gen cd4post = (UDE415_rev-1)/4
*label var cd4post "01 Recode CD UDE415_rev: Big events like wars, economic recessions,and the outcomes of elections are controlled..."
*fre cd4post 


*egen cdscale_post = rowmean (cd1post cd2post cd3post cd4post)
*label var cdscale_post "Conspiractorial Predisposition Scale 0-1 (Avg of cd1post-4post)"
*fre cdscale_post


*******************
***cdscalediff***
*******************

*gen cdscalediff = (cdscale_post - cdscale_pre)
*label var cdscalediff "Post-Pre CD Scale Difference Measure"
*fre cdscalediff

	

*******************
***repvdem***
*******************

*fre pid7

*recode pid7 (1/3=0 "Democrat") (4=. ) (5/7=1 "Republican") (8=.) (99=.) (.=.), generate(repvdem)
*label var repvdem "Republican Dummy without Independents: Recode of pid7"

*fre pid7 repvdem



*******************
***losevwin***
*******************

*gen losevwin=.
*replace losevwin=0 if repvdem==0
*replace losevwin=1 if repvdem==1
*label var losevwin "PID recoded such that Dem=0 (winner) and Rep=1 (loser)"
*label define losevwinl 1 "Loser(Rep)" 0 "Winner (Dem)"
*label value losevwin losevwin1

*fre losevwin

*pwcorr losevwin repvdem




*******************
***pidstrength01***
*******************

*fre pid7 repvdem

*gen pidstrength01=.
*replace pidstrength01=0 if pid7==3 | pid7==5
*replace pidstrength01=.5 if pid7==2 | pid7==6
*replace pidstrength01=1 if pid7==1 | pid7==7

*fre pid7 pidstrength01 repvdem

*fre pidstrength01

*gen pidstrength01DICH=.
*replace pidstrength01DICH=0 if pidstrength01 <.7
*replace pidstrength01DICH=1 if pidstrength01 >.7
*replace pidstrength01DICH=. if pidstrength01==.

*fre pidstrength01 pidstrength01DICH



*******************
*** interest01*** 
*******************

*fre newsint

*recode newsint (1=4 "Most of the time") (2=3 "Some of the time") (3=2 "Only now and then") (4=1 "Hardly at all") (7/8=.) (.=.), generate(interest)
*label var interest "Reverse code of newsint_rev: Interest in news on national govt and politics"
*fre interest

*gen interest01 = (interest -1)/3
*label var interest01 "0-1: Interest in news on govt and politics"
*fre interest01


*******************
***relig*** 
*******************

*fre pew_churatd

*recode pew_churatd (1=6 "More than once a week") (2=5 "Once a week") (3=4 "Once or twice a month") (4=3 "A few times a year") (5=2 "Seldom") (6=1 *"Never") (7/8=.) (.=.), gen(relig_rev)
*label var relig_rev "Reverse code of church pew_churatd"
*gen relig = (relig_rev-1)/5
*label var relig "How often do you attend religious services?"

*fre relig 


*******************
***trust_gov*** 
*******************

*fre UDE342
*recode UDE342 (1=4 "Almost always") (2=3 "Most of the time") (3=2 "Some of the time") (4=1 "Almost never") (.=.), generate(trustfed)
*fre UDE342 trustfed
*label var trustfed "Recode of UDE342 (trustfed)"

*fre UDE342 trustfed 

*gen trust_gov = (trustfed-1)/3
*label var trust_gov "0-1 Recode of trustfed: How often trust federal govt"
*fre trust_gov


*******************
***polknow*** 
*******************

*fre UDE336
*recode UDE336 (1/2=0 "Wrong") (3=1 "Correct") (4=0 "Wrong") (5=1 "Correct") (8=.) (.=.), gen(polknow1)
*fre polknow1

*fre UDE337
*recode UDE337 (1=1 "Correct") (2/4=0 "Wrong") (.=.), gen(polknow2)
*fre polknow2

*fre UDE338
*recode UDE338 (1=1 "Correct") (2/4=0 "Wrong") (.=.), gen(polknow3)
*fre polknow3

*fre UDE339
*recode UDE339 (4=1 "Correct") (1/3=0 "Wrong") (.=.), gen(polknow4)
*fre polknow4

*fre UDE340
*recode UDE340 (4=1 "Correct") (1/3=0 "Wrong") (.=.), gen(polknow5)
*fre polknow5

*gen polknow_comb = polknow1 + polknow2 + polknow3 + polknow5 + polknow5
*fre polknow_comb
*gen polknow = polknow_comb/5
*label var polknow "0-1 Political Knowledge Index"
*fre polknow



*******************
***educ01***
*******************

*fre educ

*recode educ (1/2=1 "Up to and including HS diploma or GED") (3/4=2 "Some college or Associate's") (5=3 "Bachelor's degree") (6=4 "Post-Bachelor's *degree") (.=.), generate(educ4pt)
*fre educ4pt
*label var educ4pt "Recode of educ: Highest level of school or degree achieved (4 categories)"
*gen educ01 = (educ4pt-1)/3
*label var educ01 "0-1 Recode of educ_alt: Level of education (4 category)"
*fre educ01


*******************
***inc01*** 
*******************

*fre faminc_new

*recode faminc_new (97/98=.) (1=1 "Less than $10,000") (2=2 "$10,000-$19,999") (3=3 "$20,000-$29,999") (4=4 "$30,000-$39,999") (5=5 "$40,000-*$49,999") (6/8=6 "50,000-$79,999") (9=7 "$80,000-$99,999") (10/11=8 "$100,000-$149,999") (12=9 "$150,000-$199,999") (13/16=10 "$200,000 or *more") (.=.), generate(income10)

*fre income10
	
*gen inc01 = (income10-1)/9
*label var inc01 "0-1 Income recode of income10: Family Income"
*fre inc01


*******************
***age01*** 
*******************

*fre birthyr

*gen age = 2020-birthyr
*label var age "Age: 2002-birthyr"
*fre age

*gen age01 = (age-18)/(72)
*label var age01 "0-1 Recode of age: Age"
*fre age01

*******************
***female*** 
*******************

*fre gender

*gen female=.
*replace female=0 if gender==1
*replace female=1 if gender==2
*replace female=. if gender==.
*label var female "Female Dummy Variable (Recode of gender)"
*label define femalel 0 "Male" 1 "Female" 
*label value female femalel

*fre female gender

*******************
***white*** 
*******************

*fre race

*gen white=.
*replace white = 1 if race ==1
*replace white = 0 if race !=1
*label var white "White Dummy Variable: Recode of race"
*label define whiteL 1 "White" 0 "Non-White" 
*label value white whiteL
*fre white


*******************
***latino***
*******************

*fre hispanic

*gen latino=.
*replace latino = 0 if hispanic == 2
*replace latino = 1 if race==3 | hispanic==1 
*label var latino "Spanish, Hispanic, or Latino Dummy Variable: Recode of hispanic"
*label define latinol 1 "Yes" 0 "No" 
*label value latino latinol
*fre latino

**NOTE: Table 1 in the manuscript is a description of the studies (field dates, Ns, etc.)

*****************************************************************
*****************************************************************
*****************************************************************
***															  
**Table 2: Cross-Sectional Predictors of Pre-Election Conspiracism
***															  
*****************************************************************
*****************************************************************
****************************************************************

*************************
*** STUDY 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

*Model 1
svy: reg cdscalew1 losevwin 
estimates store k1

*Model 2
svy: reg cdscalew1 losevwin pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store k2


*esttab k1 k2 using "Table 2 Study 1 Models 1 and 2.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


*************************
*** STUDY 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

*Model 3
svy: reg cdscale_pre losevwin 
estimates store n1

*Model 4
svy: reg cdscale_pre losevwin pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino 
estimates store n2

*esttab n1 n2 using "Table 2 Study 2 Models 3 and 4.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

*Model 5
svy: reg cdscale_pre losevwin 
estimates store s1

*Model 6
svy: reg cdscale_pre losevwin pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino 
estimates store s2

*esttab s1 s2 using "Table 2 Study 3 Models 5 and 6.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

*Model 7
svy: reg cdscale_pre losevwin 
estimates store p1

*Model 8
svy: reg cdscale_pre losevwin pididentitystrength_pre interest relig educ01 inc age01 female white latino 
estimates store p2

*esttab p1 p2 using "Table 2 Study 4 Models 7 and 8.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

*Model 9
svy: reg cdscale_pre losevwin 
estimates store g1

*Model 10
svy: reg cdscale_pre losevwin pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store g2

*esttab g1 g2 using " Table 2 Cross-Sectional Predictors of Pre-Election Conspiracism.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)
*esttab k1 k2 n1 n2 s1 s2 p1 p2 g1 g2 using "Table 2 in Manuscript.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


****************
****************
****************
***			 ***
*** FIGURE 1 *** with error bar added in Excel
***			 ***
****************
****************
****************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

sum cdscalew1 cdscalew4 if losevwin==0 & tookpost==1
sum cdscalew1 cdscalew4 if losevwin==1 & tookpost==1


*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

sum cdscale_pre cdscale_post if losevwin==0 & tookpost==1
sum cdscale_pre cdscale_post if losevwin==1 & tookpost==1

*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”


sum cdscale_pre cdscale_post if losevwin==0 & tookpost==2
sum cdscale_pre cdscale_post if losevwin==1 & tookpost==2

******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

sum cdscale_pre cdscale_post if losevwin==0 & tookpost==2
sum cdscale_pre cdscale_post if losevwin==1 & tookpost==2


********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

sum cdscale_pre cdscale_post if losevwin==0 & tookpost==2
sum cdscale_pre cdscale_post if losevwin==1 & tookpost==2


***************
***************
***************
***			***
*** Table 3. Effect of Loser Status on Pre/Post Change in Conspiracism
***			***
***************
***************
***************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

* Model 1 
svy: reg cdscalediff losevwin
estimates store m1

* Model 2 
svy: reg cdscalediff losevwin pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store m2


*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

* Model 3
svy: reg cdscalediff losevwin
estimates store m3

* Model 4
svy: reg cdscalediff losevwin pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store m4

* Model 4 - WITHOUT TRUST AND KNOWLEDGE FOR FOOTNOTE 6 in MANUSCRIPT  
svy: reg cdscalediff losevwin pidstrength01 interest relig educ01 inc age01 female white latino  


*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

* Model 5
svy: reg cdscalediff losevwin 
estimates store m5

* Model 6
svy: reg cdscalediff losevwin pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino 
estimates store m6

* Model 6 - WITHOUT TRUST AND KNOWLEDGE FOR FOOTNOTE 6 IN MANUCRIPT 
svy: reg cdscalediff losevwin pididentitystrength interest01_cces relig educ01 inc age01 female white latino 

******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7
svy: reg cdscalediff losevwin 
estimates store m7

* Model 8
svy: reg cdscalediff losevwin pididentitystrength_pre interest relig educ01 inc age01 female white latino 
estimates store m8


********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9
svy: reg cdscalediff losevwin 
estimates store m9

* Model 10
svy: reg cdscalediff losevwin pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store m10

* Model 10 - WITHOUT TRUST AND KNOWLEDGE FOR FOOTNOTE 6 IN MANUSCRIPT 
svy: reg cdscalediff losevwin pidstrength01 interest01 relig educ01 inc01 age01 female white latino 


*esttab m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 using "Table 3 Effect of Loser Status on Pre/Post Change in Conspiracism.csv", se r2 replace starlevels(+ *.10 * .05 ** .01 *** .001) b(2) se(2)


****************
****************
****************
***			 ***
*** FIGURE 2 *** 
***			 ***
****************
****************
****************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

* Model 1 Table 3
svy: reg cdscalediff losevwin
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 1, 2016", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.053 -.2 "-.04 (.01)", size(med)) ///
	text(.035 1.2 ".02 (.01)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 1 2016 LosevWin predicting consp diff score no controls.gph", replace


*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

* Model 3 Table 3
svy: reg cdscalediff losevwin
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 2, 2016", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.09 -.2 "-.07 (.02)", size(med)) ///
	text(.055 1.2 ".04 (.01)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 2 2016 LosevWin predicting consp diff score no controls.gph", replace

*gr combine "Study 1 2016 LosevWin predicting consp diff score no controls.gph" "Study 2 2016 LosevWin predicting consp diff score no controls.gph", *graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 2 no controls.gph", replace


****************
****************
****************
***			 ***
*** FIGURE 3 *** 
***			 ***
****************
****************
****************

*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

* Model 5 Table 2
svy: reg cdscalediff losevwin 
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 3, 2018", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.025 -.2 "-.01 (.01)", size(med)) ///
    text(.04 1.2 ".03 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 3 2018 LosevWin predicting consp diff score no controls.gph", replace


******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7 Table 2
svy: reg cdscalediff losevwin 
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.04 -.2 "-.03 (.01)", size(med)) ///
    text(.025 1.2 ".01 (.01)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score no controls.gph", replace

*gr combine "Study 3 2018 LosevWin predicting consp diff score no controls.gph" "Study 4 2018 LosevWin predicting consp diff score no controls.gph", *graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 3 no controls.gph", replace

****************
****************
****************
***			 ***
*** FIGURE 4 *** 
***			 ***
****************
****************
****************

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9 Table 2
svy: reg cdscalediff losevwin 
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.062 -.2 "-.05 (.01)", size(med)) ///
    text(.065 1.2 ".05 (.01)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predicting consp diff score no controls.gph", replace
*graph save "Figure 4 no controls.gph", replace


***************
***************
***************
***			***
*** Table 4. Does Strength of Partisanship Moderate the Effect of Loser Status on Pre/Post Change in Conspiracism?
***			***
***************
***************
***************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

* Model 1
svy: reg cdscalediff i.losevwin##c.pididentitystrength
estimates store m11

* Model 2
svy: reg cdscalediff i.losevwin##c.pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store m12

*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

* Model 3  
svy: reg cdscalediff i.losevwin##c.pidstrength01
estimates store m13

* Model 4  
svy: reg cdscalediff i.losevwin##c.pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store m14

*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

* Model 5 
svy: reg cdscalediff i.losevwin##c.pididentitystrength
estimates store m15

* Model 6 
svy: reg cdscalediff i.losevwin##c.pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino   
estimates store m16

******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre
estimates store m17

* Model 8
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre interest relig educ01 inc age01 female white latino   
estimates store m18

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9
svy: reg cdscalediff i.losevwin##c.pidstrength01
estimates store m19

* Model 10
svy: reg cdscalediff i.losevwin##c.pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store m20

*esttab m11 m12 m13 m14 m15 m16 m17 m18 m19 m20 using "Table 2 Does Strength of Partisanship Moderate.csv", se r2 replace                        *starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


****************
****************
****************
***			 ***
*** FIGURE 5 *** 
***			 ***
****************
****************
****************

******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7 Table 3
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre

svy: reg cdscalediff losevwin if pididentitystrength_preDICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, Low PID Strength", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.028 -.2 "-.02 (.02)", size(med)) ///
    text(-.02 1.2 "-.01 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score for low pid strength no controls.gph", replace


svy: reg cdscalediff losevwin if pididentitystrength_preDICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, High PID Strength", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.058 -.2 "-.05 (.02)", size(med)) ///
    text(.055 1.2 ".04 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score for high pid strength no controls.gph", replace


*gr combine "Study 4 2018 LosevWin predicting consp diff score for low pid strength no controls.gph" "Study 4 2018 LosevWin predicting consp diff score *for high pid strength no controls.gph", graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 5 no controls.gph", replace

****************
****************
****************
***			 ***
*** FIGURE 6 *** 
***			 ***
****************
****************
****************

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9 Table 3
svy: reg cdscalediff i.losevwin##c.pidstrength01

svy: reg cdscalediff losevwin if pidstrength01DICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, Low PID Strength", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.05 -.2 "-.04 (.01)", size(med)) ///
    text(.038 1.2 ".02 (.01)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predicting consp diff score for low pid strength no controls.gph", replace

svy: reg cdscalediff losevwin if pidstrength01DICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, High PID Strength", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.075 -.2 "-.06 (.01)", size(med)) ///
    text(.095 1.2 ".08 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predicting consp diff score for high pid strength no controls.gph", replace

*gr combine "Study 5 2020 LosevWin predicting consp diff score for low pid strength no controls.gph" "Study 5 2020 LosevWin predicting consp diff score *for high pid strength no controls.gph", graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 6 no controls.gph", replace


***************
***************
***************
***			***
*** Table 5. Does the Combination of Strength of Partisanship and Political Interest Moderate 
*** the Effect of Party Identification on Pre/Post Change in Conspiracism?
***			***
***************
***************
***************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

* Model 1
svy: reg cdscalediff i.losevwin##c.pididentitystrength##c.interest401
estimates store m21

* Model 2
svy: reg cdscalediff i.losevwin##c.pididentitystrength##c.interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store m22

*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

* Model 3
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest
estimates store m23
pwcorr losevwin pidstrength01 interest, sig

* Model 4
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest relig trust_govt polknow educ01 inc age01 female white latino    
estimates store m24

*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

* Model 5   
svy: reg cdscalediff i.losevwin##c.pididentitystrength##c.interest01_cces
estimates store m25
pwcorr losevwin pididentitystrength interest01, sig

* Model 6  
svy: reg cdscalediff i.losevwin##c.pididentitystrength##c.interest01_cces relig trust_govt polknow educ01 inc age01 female white latino      
estimates store m26

******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre##c.interest
estimates store m27
pwcorr losevwin pididentitystrength_pre interest, sig

* Model 8
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre##c.interest relig educ01 inc age01 female white latino      
estimates store m28

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest01 
estimates store m29
pwcorr losevwin pidstrength01 interest01, sig

* Model 10
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store m30


*esttab m21 m22 m23 m24 m25 m26 m27 m28 m29 m30 using "Table 3 Does Strength of Partisanship X Interest Moderate.csv", se r2 replace *starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


****************
****************
****************
***			 ***
*** FIGURE 7 *** 
***			 ***
****************
****************
****************

***************************************************************
*** STUDY 1 CSPP 2016***
***************************************************************

*use “STUDY 1 CSPP 2016.dta”

svyset [pw=weight4]

* Model 1 Table 5 
svy: reg cdscalediff i.losevwin##c.pididentitystrength##c.interest401

svy: reg cdscalediff losevwin if pididentitystrengthDICH==0 & interest401DICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 1, 2016, Low PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(.035 1.2 ".02 (.02)", size(med)) ///
    text(-.05 -.2 "-.04 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 1 2016 LosevWin predicting consp diff score for low pid strength and low interest no controls.gph", replace

svy: reg cdscalediff losevwin if pididentitystrengthDICH==0 & interest401DICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 1, 2016, Low PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.015 1.2 "-.00 (.02)", size(med)) ///
    text(-.07 -.2 "-.06 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Loser" 1 "Winner", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 1 2016 LosevWin predicting consp diff score for low pid strength and high interest no controls.gph", replace

svy: reg cdscalediff losevwin if pididentitystrengthDICH==1 & interest401DICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 1, 2016, High PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.015 1.2 "-.00 (.02)", size(med)) ///
    text(.055 -.2 ".04 (.03)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 1 2016 LosevWin predicting consp diff score for high pid strength and low interest no controls.gph", replace

svy: reg cdscalediff losevwin if pididentitystrengthDICH==1 & interest401DICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 1, 2016, High PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(.06 1.2 ".05 (.02)", size(med)) ///
    text(-.07 -.2 "-.06 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 1 2016 LosevWin predicting consp diff score for high pid strength and high interest no controls.gph", replace

*gr combine "Study 1 2016 LosevWin predicting consp diff score for low pid strength and low interest no controls.gph" "Study 1 2016 LosevWin predicting *consp diff score for low pid strength and high interest no controls.gph" ///
*	"Study 1 2016 LosevWin predicting consp diff score for high pid strength and low interest no controls.gph" "Study 1 2016 LosevWin predicting *consp diff score for high pid strength and high interest no controls.gph", graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 7 no controls.gph", replace


****************
****************
****************
***			 ***
*** FIGURE 8 *** 
***			 ***
****************
****************
****************

******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

* Model 7 Table 5
svy: reg cdscalediff i.losevwin##c.pididentitystrength_pre##c.interest

svy: reg cdscalediff losevwin if pididentitystrength_preDICH==0 & interestDICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, Low PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.03 -.2 "-.02 (.03)", size(med)) ///
    text(.018 1.2 ".01 (.03)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score low pid strength low interest no controls.gph", replace


svy: reg cdscalediff losevwin if pididentitystrength_preDICH==0 & interestDICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, Low PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.023 -.2 "-.01 (.02)", size(med)) ///
    text(-.035 1.2 "-.02 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score low pid strength hi interest no controls.gph", replace


svy: reg cdscalediff losevwin if pididentitystrength_preDICH==1 & interestDICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, High PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.048 -.2 "-.03 (.03)", size(med)) ///
    text(.035 1.2 ".02 (.04)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1(.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score hi pid strength low interest no controls.gph", replace


svy: reg cdscalediff losevwin if pididentitystrength_preDICH==1 & interestDICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 4, 2018, High PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.065 -.2 "-.05 (.02)", size(med)) ///
    text(.06 1.2 ".05 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).1, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 4 2018 LosevWin predicting consp diff score hi pid strength hi interest no controls.gph", replace

*gr combine "Study 4 2018 LosevWin predicting consp diff score low pid strength low interest no controls.gph" "Study 4 2018 LosevWin predicting consp *diff score low pid strength hi interest no controls.gph" ///
*	"Study 4 2018 LosevWin predicting consp diff score hi pid strength low interest no controls.gph" "Study 4 2018 LosevWin predicting consp diff *score hi pid strength hi interest no controls.gph", graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 8 no controls.gph", replace

****************
****************
****************
***			 ***
*** FIGURE 9 *** 
***			 ***
****************
****************
****************

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

* Model 9 Table 5
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest01 

svy: reg cdscalediff losevwin if pidstrength01DICH==0 & interest01DICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, Low PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.065 -.2 "-.04 (.02)", size(med)) ///
    text(.03 1.2 ".01 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).15, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predict consp diff score low pid str low interest no controls.gph", replace


svy: reg cdscalediff losevwin if pidstrength01DICH==0 & interest01DICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, Low PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.045 -.2 "-.03 (.02)", size(med)) ///
    text(.055 1.2 ".04 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).15, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predict consp diff score low pid str hi interest no controls.gph", replace


svy: reg cdscalediff losevwin if pidstrength01DICH==1 & interest01DICH==0
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, High PID Strength/Low Interest", col(black) size(med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.029 -.2 "-.01 (.03)", size(med)) ///
    text(-.042 1.2 "-.03 (.04)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).15, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predict consp diff score for hi pid str and low interest no controls.gph", replace


svy: reg cdscalediff losevwin if pidstrength01DICH==1 & interest01DICH==1
margins, at(losevwin=(0(1)1)) 
marginsplot, title ("Study 5, 2020, High PID Strength/High Interest", col(black) size (med) nospan) xtitle(Election Winner/Loser, size(med)) recast(bar) plotop(bc(gs6%50)) ///
	text(-.095 -.2 "-.08 (.02)", size(med)) ///
    text(.127 1.2 ".11 (.02)", size(med)) ///
	graphregion(fcolor(white) lcolor(white)) ///
	ylab(-.1 (.05).15, angle(0) labsize(med)) ///
	xlab(0 "Winner" 1 "Loser", labsize(med)) ///
	ytitle("Predicted Value on Conspiratorial Thinking Difference Scale", size(small)) ///
	yline(0, lcolor(black%100) lwidth(medthick) lstyle(foreground) extend) ///
	scheme(s1mono) 
*graph save "Study 5 2020 LosevWin predict consp diff score hi pid str hi interest no controls.gph", replace

*gr combine "Study 5 2020 LosevWin predict consp diff score low pid str low interest no controls.gph" "Study 5 2020 LosevWin predict consp diff score *low pid str hi interest no controls.gph" ///
*	"Study 5 2020 LosevWin predict consp diff score for hi pid str and low interest no controls.gph" "Study 5 2020 LosevWin predict consp diff score *hi pid str hi interest no controls.gph", graphregion(fcolor(white) lcolor(white)) row(2)
*graph save "Figure 9 no controls.gph", replace

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

*******************************
*******************************
** Appendix A – Testing for Differential Attrition **
*******************************
*******************************

*************************
*** Study 1 CSPP 2016 ***
*************************


*use “STUDY 1 CSPP 2016.dta”

fre tookpost

*NOTE: tookpost=1 if completed post election survey


logit tookpost cdscalew1 pid7 pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino
estimates store attrst1


*esttab attrst1 using "Study 1 Attrition predictors 2016 CSPP.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

fre tookpost

logit tookpost cdscale_pre pid7 pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store attrst2


*esttab attrst2 using "Study 2 Attrition predictors 2016 CES.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”


logit tookpostdum cdscale_pre pid7 pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino 
estimates store attrst3


*esttab attrst3 using "Study 3 Attrition predictors 2018 CES UMN.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)




******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”


logit tookpostdum cdscale_pre pid7 pididentitystrength_pre interest relig educ01 inc age01 female white latino 
estimates store attrst4

*esttab attrst4 using "Study 4 Attrition predictors 2018 CES UDEL.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)



********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”


logit tookpostdum cdscale_pre pid7 pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store attrst5


*esttab attrst5 using "Study 5 Attrition predictors 2020 CES UDEL.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)
*esttab attrst1 attrst2 attrst3 attrst4 attrst5 using "Appendix A Testing for Differential Attrition.csv", se r2 replace                                                                      *starlevels(+ .10 * .05 ** .01 *** .001) *b(2) se(2)


*NOTE: Appendix B is Question Wording


*******************************
*******************************
** Appendix C – Unweighted Descriptives Studies 1 and 2 **
*******************************
*******************************

*************************
*** Study 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

fre losevwin

tab completew4
	*age for age01 and income10 for inc
fre losevwin educ income10 age female white latino if completew4==1
sum age pididentitystrength cdscalew4 cdscalew1 interest401 trustgovt01 polknow relig if completew4==1

alpha cd1w1 cd2w1 cd3w1 cd4w1
alpha cd1w4 cd2w4 cd3w4 cd4w4 

sum cdscalew1 cdscalew4 if repvdem_alt==0 & completew4==1
sum cdscalew1 cdscalew4 if repvdem_alt==1 & completew4==1


*************************
*** Study 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

fre tookpost
	*age for age01 and income10 for inc
fre  losevwin pidstrength01 educ01 inc age female white latino relig  if tookpost==1
sum cdscale_post cdscale_pre interest trust_govt polknow age if tookpost==1

alpha cd1_pre cd2_pre cd3_pre cd4_pre if tookpost==1
alpha cd1_post cd2_post cd3_post cd4_post if tookpost==1

sum cdscale_pre cdscale_post if losevwin==0 & tookpost==1
sum cdscale_pre cdscale_post if losevwin==1 & tookpost==1


*******************************
*******************************
** Appendix D – Unweighted Descriptives Studies 3 and 4 **
*******************************
*******************************

*****************************
*** Study 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

fre tookpost
	*age for age01 and income10 for inc
fre losevwin educ01 income10 age female white latino relig if tookpost==2
sum cdscale_post cdscale_pre pididentitystrength interest01_cces polknow trust_comb age if tookpost==2

alpha cd1_pre cd2_pre cd3_pre cd4_pre if tookpost==2
alpha cd1_post cd2_post cd3_post cd4_post if tookpost==2
alpha trust_govt trust_police trust_media trust_people if tookpost==2


******************************
*** Study 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

fre tookpost
	*age for age01 and income10 for inc
fre repvdem educ01 income10 age female white latino relig if tookpost==2
sum cdscale_post cdscale_pre pididentitystrength_pre interest age if tookpost==2

alpha cd1_pre cd2_pre cd3_pre cd4_pre if tookpost==2
alpha cd1_post cd2_post cd3_post cd4_post if tookpost==2


*******************************
*******************************
** Appendix E - Unweighted Descriptives Study 5 **
*******************************
*******************************

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

fre tookpost
	*Age for age01 and income10 for inc
fre losevwin educ01 income10 Age female white latino relig pidstrength01 if tookpost==2
sum cdscale_post cdscale_pre interest01 polknow trust_comb01 Age if tookpost==2

alpha UDE312_rev UDE313_rev UDE314_rev UDE315_rev if tookpost==2
alpha UDE412_rev UDE413_rev UDE414_rev UDE415_rev if tookpost==2
alpha trustfed trustlaw trustmedia trustpeople if tookpost==2


************************************************************
************************************************************
** Appendix F. Unweighted Analyses: Effect of Loser Status on Pre/Post Change in Conspiracism  **
************************************************************
************************************************************

**************************
*** STUDY 1 CSPP 2016 ***
**************************

*use “STUDY 1 CSPP 2016.dta”


* Model 1 Appendix F
reg cdscalediff losevwin
estimates store unw1

* Model 2 Appendix F
reg cdscalediff losevwin pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store unw2

****************************
*** STUDY 2 CCES 2016 ***
****************************

*use “Study 2 CCES 2016.dta”


* Model 3 Appendix F
reg cdscalediff losevwin
estimates store unw3

* Model 4 Appendix F
reg cdscalediff losevwin pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store unw4

*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”
 
* Model 5 Appendix F
reg cdscalediff losevwin 
estimates store unw5

* Model 6 Appendix F
reg cdscalediff losevwin pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino 
estimates store unw6

******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

* Model 7 Appendix F
reg cdscalediff losevwin 
estimates store unw7

* Model 8 Appendix F
reg cdscalediff losevwin pididentitystrength_pre interest relig educ01 inc age01 female white latino 
estimates store unw8

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”


* Model 9 Appendix F
reg cdscalediff losevwin 
estimates store unw9

* Model 10 Appendix F
reg cdscalediff losevwin pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store unw10

*esttab unw1 unw2 unw3 unw4 unw5 unw 6 unw7 unw8 unw9 unw10 using "Appendix F Unweighted Analyses Effect of Loser Status on Pre/Post Change *in Conspiracism.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)


************************************************************
************************************************************
** Appendix G. Unweighted Analyses: Does Strength of Partisanship Moderate 
**the Effect of Loser Status on Pre/Post Change in Conspiracism? 
 ************************************************************
************************************************************


**************************
*** STUDY 1 CSPP 2016 ***
**************************

*use “STUDY 1 CSPP 2016.dta”

* Model 1  Appendix G
reg cdscalediff i.losevwin##c.pididentitystrength
estimates store unw11

* Model 2  Appendix G 
reg cdscalediff i.losevwin##c.pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store unw12

****************************
*** STUDY 2 CCES 2016 ***
****************************

*use “Study 2 CCES 2016.dta”


* Model 3  Appendix G
reg cdscalediff i.losevwin##c.pidstrength01
estimates store unw13

* Model 4 Appendix G 
reg cdscalediff i.losevwin##c.pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store unw14

*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

* Model 5 Appendix G
reg cdscalediff i.losevwin##c.pididentitystrength
estimates store unw15

* Model 6 Appendix G
reg cdscalediff i.losevwin##c.pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino   
estimates store unw16


******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

* Model 7 Appendix G
reg cdscalediff i.losevwin##c.pididentitystrength_pre
estimates store unw17

* Model 8 Appendix G
reg cdscalediff i.losevwin##c.pididentitystrength_pre interest relig educ01 inc age01 female white latino   
estimates store unw18

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

* Model 9 Appendix G
reg cdscalediff i.losevwin##c.pidstrength01
estimates store unw19

* Model 10 Appendix G
reg cdscalediff i.losevwin##c.pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store unw20


*esttab unw11 unw12 unw13 unw14 unw15 unw 16 unw17 unw18 unw19 unw20 using "Appendix G Unweighted Analyses Does Strength of Partisanship *Moderate the Effect of Loser Status on Pre/Post Change in Conspiracism.csv", se r2 replace starlevels(+ .10 * .05 ** .01 *** .001) b(2) se(2)

************************************************************
************************************************************
** Appendix H. Unweighted Analyses: Does Strength of Partisanship Moderate 
**the Effect of Loser Status on Pre/Post Change in Conspiracism? 
 ************************************************************
************************************************************


**************************
*** STUDY 1 CSPP 2016 ***
**************************

*use “STUDY 1 CSPP 2016.dta”


* Model 1  Appendix H 
reg cdscalediff i.losevwin##c.pididentitystrength##c.interest401
estimates store unw21

* Model 2  Appendix H
reg cdscalediff i.losevwin##c.pididentitystrength##c.interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store unw22


****************************
*** STUDY 2 CCES 2016 ***
****************************

*use “Study 2 CCES 2016.dta”

* Model 3 Appendix H
reg cdscalediff i.losevwin##c.pidstrength01##c.interest
estimates store unw23

* Model 4 Appendix H
reg cdscalediff i.losevwin##c.pidstrength01##c.interest relig trust_govt polknow educ01 inc age01 female white latino    
estimates store unw24


*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

* Model 5  Appendix H 
reg cdscalediff i.losevwin##c.pididentitystrength##c.interest01_cces
estimates store unw25

* Model 6  Appendix H
reg cdscalediff i.losevwin##c.pididentitystrength##c.interest01_cces relig trust_govt polknow educ01 inc age01 female white latino      
estimates store unw26


******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

* Model 7 Appendix H
reg cdscalediff i.losevwin##c.pididentitystrength_pre##c.interest
estimates store unw27

* Model 8 Appendix H
reg cdscalediff i.losevwin##c.pididentitystrength_pre##c.interest relig educ01 inc age01 female white latino      
estimates store unw28



********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

* Model 9 Appendix H
reg cdscalediff i.losevwin##c.pidstrength01##c.interest01 
estimates store unw29

* Model 10 Appendix H
svy: reg cdscalediff i.losevwin##c.pidstrength01##c.interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store unw30


*esttab unw21 unw22 unw23 unw24 unw25 unw26 unw27 unw28 unw29 unw30 using "Appendix H. Unweighted Analyses: Does the Combination of *Strength of Partisanship and Political Interest Moderate the Effect of Loser Status on Pre/Post Change in Conspiracism.csv", se r2 replace                          *starlevels(+ *.10 * .05 ** .01 *** .001) b(2) se(2)


************************************************************
************************************************************
** Appendix I. Weighted Post-Election Cross-Sectional Analyses
************************************************************
************************************************************

*************************
*** STUDY 1 CSPP 2016 ***
*************************

*use “STUDY 1 CSPP 2016.dta”

*Model 1 Appendix I
svy: reg cdscalew4 losevwin
estimates store d1

*Model 2 Appendix I
svy: reg cdscalew4 losevwin pididentitystrength interest401 relig trustgovt01 polknow educ inc age01 female white latino  
estimates store d2

*************************
*** STUDY 2 CCES 2016 ***
*************************

*use “Study 2 CCES 2016.dta”

svyset [pw=weight]

*Model 3 Appendix I
svy: reg cdscale_post losevwin
estimates store d3

*Model 4 Appendix I
svy: reg cdscale_post losevwin pidstrength01 interest relig trust_govt polknow educ01 inc age01 female white latino  
estimates store d4

*****************************
*** STUDY 3 CCES UMN 2018 ***
*****************************

*use “Study 3 CCES UMN 2018.dta”

svyset [pw=teamweight]

*Model 5 Appendix I
svy: reg cdscale_post losevwin 
estimates store d5

*Model 6 Appendix I
svy: reg cdscale_post losevwin pididentitystrength interest01_cces relig trust_govt polknow educ01 inc age01 female white latino 
estimates store d6

******************************
*** STUDY 4 CCES CPC 2018 ***
******************************

*use “Study 4 CCES CPC 2018.dta”

svyset [pw=teamweight]

*Model 7 Appendix I
svy: reg cdscale_post losevwin 
estimates store d7

*Model 8 Appendix I
svy: reg cdscale_post losevwin pididentitystrength_pre interest relig educ01 inc age01 female white latino 
estimates store d8

********************************
*** STUDY 5 CES UDEL 2020 ***
********************************

*use “Study 5 CES UDEL 2020.dta”

svyset [pw=teamweight]

*Model 9 Appendix I
svy: reg cdscale_post losevwin 
estimates store d9

*Model 10 Appendix I
svy: reg cdscale_post losevwin pidstrength01 interest01 relig trust_gov polknow educ01 inc01 age01 female white latino 
estimates store d10


*esttab d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 using "Appendix I Weighted Post-Election Cross-Sectional Analyses.csv", se r2 replace                                            *starlevels(+ .10 * .05 ** *.01 *** .001) b(2) se(2)
